<style>
    #tenant-edit {
        .menu-tree {
            height: 330px;
            overflow-y: auto;
        }
        hr {
            margin-left: 25px;
        }
    }
</style>
<div class="layui-fluid" id="tenant-edit">
    <form class="layui-form" action="" lay-filter="tenant-edit-form">
        <fieldset class="layui-elem-field">
            <legend id="base_field">基本信息</legend>
            <div class="layui-field-box">
                <div class="layui-form-item febs-hide">
                    <label class="layui-form-label febs-form-item-require">公司ID：</label>
                    <div class="layui-input-block">
                        <input type="text" name="tenantId" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs6">
                            <label class="layui-form-label febs-form-item-require">公司名称：</label>
                            <div class="layui-input-block">
                                <input type="text" name="tenantName" autocomplete="off" class="layui-input" minlength="2"
                                       maxlength="20" placeholder="请输入公司名称" lay-verify="range">
                            </div>
                        </div>
                        <div class="layui-col-xs6">
                            <label class="layui-form-label febs-form-item-require">公司简称：</label>
                            <div class="layui-input-block">
                                <input type="text" name="shortName" autocomplete="off" class="layui-input" minlength="2"
                                       maxlength="10" placeholder="请输入公司简称" lay-verify="range">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </fieldset>
        <fieldset class="layui-elem-field">
            <legend >系统对接</legend>
            <div class="layui-field-box">
                <div class="layui-form-item">
                    <label class="layui-form-label">AppId：</label>
                    <div class="layui-input-block">
                        <span id="appIdSpan" th:text="${tenant.appId}"></span>
                        <input type="text" name="appId" disabled autocomplete="off" class="layui-input layui-hide" minlength="2"
                               maxlength="100">
                        <button type="button" class="layui-btn layui-btn-xs" lay-filter="tenant-edit-form-creatAppId" th:if="${tenant.appId == null}" id="creatAppId">生成</button>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">AppSecret：</label>
                    <div class="layui-input-block">
                        <span id="appSecretSpan" th:text="${tenant.appSecret}"></span>
                        <input type="text" name="appSecret" disabled autocomplete="off" class="layui-input layui-hide" minlength="2"
                               maxlength="500">
                        <button type="button" class="layui-btn layui-btn-xs"  lay-filter="tenant-edit-form-creatAppSecret" id="creatAppSecret" th:if="${tenant.appSecret == null}">生成</button>
                        <button type="button" class="layui-btn layui-btn-xs"  lay-filter="tenant-edit-form-resetAppSecret" id="resetAppSecret" th:if="${tenant.appSecret != null}">重置</button>
                    </div>
                </div>
            </div>
        </fieldset>
        <fieldset class="layui-elem-field">
            <legend >支付相关</legend>
            <div class="layui-field-box">

            </div>
        </fieldset>
        <div class="layui-form-item febs-hide">
            <button class="layui-btn" lay-submit="" lay-filter="tenant-edit-form-submit" id="submit"></button>
            <button type="reset" class="layui-btn" id="reset"></button>
        </div>
    </form>
</div>

<script data-th-inline="javascript">
    tenant = [[${tenant}]];
    tenantSelect= [[${tenantSelect}]];
</script>
<script th:src="@{/febs/js/system/tenant/tenantEdit.js(v=1)}"></script>
